Skip to content

Fix inset colorbar frame reflow for refaspect#593

Merged
cvanelteren merged 9 commits intomainfrom
fix/inset-colorbar-refaspect
Feb 26, 2026
Merged

Fix inset colorbar frame reflow for refaspect#593
cvanelteren merged 9 commits intomainfrom
fix/inset-colorbar-refaspect

Conversation

@cvanelteren
Copy link
Collaborator

Closes #592
With refaspect, the inset colorbar geometry is finalized during draw. Previously, we were reflowing the inset frame too late (effectively after draw scheduling), so some render paths used stale bounds and the frame no longer wrapped the label correctly.

The fix moves frame reflow into the actual draw path and runs it before artists are painted, using the active renderer. We also mark inset colorbars as needing reflow when created, so the frame is recomputed at the right time. That makes the frame/label layout deterministic across backends and preserves correct wrapping with refaspect.

A regression test was added to lock this behavior.

@cvanelteren cvanelteren requested a review from beckermr February 23, 2026 10:16
@cvanelteren cvanelteren marked this pull request as draft February 23, 2026 10:29
@cvanelteren cvanelteren marked this pull request as draft February 23, 2026 10:29
@cvanelteren cvanelteren marked this pull request as ready for review February 23, 2026 20:51
@cvanelteren cvanelteren enabled auto-merge (squash) February 26, 2026 04:03
@cvanelteren
Copy link
Collaborator Author

Fix is relatively minor; just aligning already present machinery to work for the inset properly -- merging without review @beckermr

@cvanelteren cvanelteren merged commit 4925cc1 into main Feb 26, 2026
15 checks passed
@cvanelteren cvanelteren deleted the fix/inset-colorbar-refaspect branch February 26, 2026 04:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Inset colorbar's title is out of the frame with refaspect

1 participant